---
title: Docusaurus Plugin
---
import { Aside } from '@astrojs/starlight/components';
import Install from '../../../../components/Install.astro'


The docusaurus plugin allows you to index the content of your Docusaurus websites and offer text search to your visitors.
This plugin can be used in OSS mode where you host the documents, or in cloud mode where your data will be stored by us and you will have access to analytics where you can see the number of queries and much more.

## Pre-requisites

In order guarantee a correct functionality of the plugin, you need to have the `@docusaurus/core` at least in the version `3.2.0`.

<Aside type="caution">
This plugin do not support Docusaurus v2. Use [`@orama/plugin-docusaurus`](https://www.npmjs.com/package/@orama/plugin-docusaurus) instead.
</Aside>

## Installation

You can install the plugin using any major Node.js package manager:

<Install pkg="@orama/plugin-docusaurus-v3" />

## Usage

### With Orama OSS

Add the plugin to your `docusaurus.config.js`:

```js
{
  // ...
  plugins: ["@orama/plugin-docusaurus-v3"],
  // ...
}
```

And that's it, you now have a search that will update whenever you build your site.

### With Orama Cloud

If you want to use Orama Cloud as the source so you can have access to analytics for free you need a couple more variables:

```js
// ...
plugins: [
  [
    "@orama/plugin-docusaurus-v3",
    {
      cloud: {
        indexId: "<your_orama_index_id>",
        oramaCloudAPIKey: process.env.ORAMA_CLOUD_API_KEY, // Env variable suggested
        deploy: true, // Enables deploy while building/starting
      },
    },
  ],
];
// ...
```

To get this variables first create a new integration for HTTP Integrations in here:

<img
  src='/oss/docussarus-1.png'
  alt='select integrations'
/>

And then docusaurus:

<img
  src='/oss/docussarus-2.png'
  alt='Select Docusaurus'
/>

On the next page you will see all the variables you need to get you up and running:

<img
  src='/oss/docussarus-3.png'
  alt="the variables"
/>

And you are set, if you set deploy to true your index will update whenever you build the website and there are changes to your pages.
